Macros Wizard
The wizard makes the creation of scripts easier with its graphical user interface. It can be particularly useful to new users, as no previous knowledge on the syntax used in scripts is required.
The wizard enables you:
- to defer an amount using the Discrepancy function,
- to break down an amount over a period of time using the Periodic Distribution function,
- to distribute an amount on several budget codes using the Analytic Distribution function,
- to associate a logical condition using the Logical function.
To access the Macros Wizard, click the Macros Wizard button in the Script area of the main page for macros creation or modification.

- In the Function Selection area of the Macros Wizard, select a function in the dropdown list.
The Elements of function area in the Macros Wizard form, displays the fields corresponding to the predefined function.
- If you want to set up your script by copying an existing one and modifying it, select the macro which includes the script to copy:
- In the Macro field, click the
button.
- In the list of macros, double-click a macro to select it, or click it and click OK.
The code and description of the macro are displayed in the Macro area in the wizard page.
The selected settings of the script are displayed in the Elements of function area. You can modify them.
- In the Attribute field, click the button
, then the Budget Codes and, in the list of budget codes, double-click a line to select it.
The function will have the selected budget code.
- Enter settings values for the selected function, as described in the topics below.
You can view the script in the Result field.
- Select one of the following options:
- Add to add the amount calculated by the script to the entered amounts, if any,
- Replace so that the entered amounts in the target cells, if any, are replaced by the amount calculated by the new script.
The Script area displays the scripts existing for this macro.
- Click OK at the top of the page to validate the script.
The creation page of the macro is displayed again with the script in the Script field.
- or -
Click the Cancel button to redisplay the main creation page for macros without saving the script. - Click OK to save the macro.

The setup page for discrepancies is displayed when you select the Discrepancy option in the dropdown list of the Macros Wizard.
- In the Percentage of amount field, enter the percentage of amount to defer.
Info
You can decide not to defer 100% of the amount. In this specific case, two transactions are created in the Treasury Budget, one corresponding to the non-deferred amount part and the other to the deferred amount part.
The Start Date field, is defined by DATE by default. You can modify this value if necessary (this case is quite unusual).
- In the End Date field, enter the end date of the discrepancy.
Use the button to select successively dates, logical operators and periods. You can multiply the periods by entering a number just before the period keyword.
Examples of Dates
- Transaction Date: DATE
- Transaction Date plus one month: DATE+1M
The Frequency field is enabled if the set up dates specify a discrepancy with cumulation (see the explanations below for more information on the Discrepancy with Cumulation). Enter the frequency of the discrepancy in months in this field.
Note that the Discrepancy function enables you to set up either a simple discrepancy, or a discrepancy with cumulation. The following table presents two examples of setup:
Simple discrepancy | Discrepancy with cumulation | |
---|---|---|
Start Date | DATE | DATE |
End Date | DATE+1M | ENDOFQUARTER |
Periodicity | 0 | |
Result | All transactions are deferred for one month without cumulation. | The amounts are cumulated and deferred to the end of the quarter. |
In the table above, concerning the discrepancy with cumulation, you can see that the specified end date corresponds to a start date or end of a period.
The following table presents examples of setup using the discrepancy function:
Sales collection on the 4th of next month | Payment of fringe benefits every 3 months | Payment of electricity bills every 2 months | |
---|---|---|---|
Percentage of the amount | 100 | 100 | 100 |
Start Date | DATE | DATE | DATE |
End Date | ENDOFMONTH+4D | ENDOFQUARTER+1D | ENDOFMONTH |
Periodicity | 0 | 0 | 2 |
Result | The amounts are deferred to the next month and cumulated to be collected on the 4th. | Amounts are cumulated and paid on the 1st day of the next quarter. | Amounts are cumultated every two months. |

This function enables you to distribute an amount on several successive periods.
To access it:
- If you are using the Macros Wizard, select the Periodic Distribution option from the drop-down list of the Function Selection area
- If you are on the entry page for the budget:
- Select a cell, click the Distributions button in the actions bar, then, from the contextual menu, select the Periodic Distribution option
- Or right-click in a cell and select the Periodic Distribution option
The entry page for the function settings is displayed.
- The Start Date field, is defined by DATE by default. You can modify this value if necessary (this case is quite unusual).
Use the button to select successively dates, logical operators and periods. You can multiply the periods by entering a number just before the period keyword.
Examples of Dates
- Transaction Date: DATE
- Transaction Date plus one month: DATE+1M
- On the first line of the table below, enter a period value in the Period column, and a percentage value in the Percentage column.
E.g. if you enter "1M" in the Period column and "60" in the Percentage column, 60% of the amount will be deferred to the next month.
For more information on period definition, click here.
- Click the button
to add a line to the table.
- In the following line, enter another value for the period and another value for the percentage.
- Redo steps 3 and 4 as many times as necessary to add periods to the distribution.
Info
You can distribute less than 100% of the total amount.
For example, if you want to set up the collection of a payment in 4 times (25% on sale, then 25% the next month), you can define the settings as follows:
Payment in 4 times | ||
---|---|---|
Percentage | 100 | |
Period/Percentage | 0M | 25% |
1M | 25% | |
2M | 25% | |
3M | 25% |

This function enables you to distribute an amount on several budget codes.
To access it:
- If you are using the Macros wizard, select the Analytic Distribution option from the drop-down list of the Function Selection area.
- If you are on the entry page for the budget:
- Select a cell, click the Distributions button in the actions bar, then, from the contextual menu, select the Analytic Distribution option
- Or right-click in a cell and select the Analytic Distribution option
The entry page for the function settings is displayed.
- On the first line of the table below, enter a budget code in the Budget Code column and a percentage value in the Percentage column.
For example, if you enter "VENA" in the Budget Code column and "60" in the Percentage column, 60% of the amount will be assigned to the "VENA" budget code.
For more information on period definition, click here.
- Click the button
to add a line to the table.
- In the following line, enter another value for the period and another value for the percentage.
- Redo steps 3 and 4 as many times as necessary to add periods to the distribution.
Info
You can distribute less than 100% of the total amount.

The setup page for Logical Conditions is displayed when you select the Logical option from the drop-down list of the Macros Wizard.
The following example illustrates a logical condition that enables the calculation of a premium according to the turnover.
- IF Condition field: T>1,000,000
- THEN field: T*10%
- ELSE field: T*5%
This formula specifies that, if the turnover is over 1,000,000 euros, then the allocated premium equals 10% of the turnover. Otherwise, the premium equals 5% of the turnover.
- In the IF Condition field, enter an IF logicaI condition.
Use the buttonto select successively logical operators and budget codes. After positioning your cursor in the target place for entry, enter amounts with your keyboard.
Examples of If Conditions
- VENA>1000
- VENA+VENB>100
- VENB>VENA
- In the Then area, enter the value or expression that enables the calculation of the target budget code if the If condition is verified.
Examples of Then expressions
- Value: 100
- Expression: VENA*10%
The following example shows the payment of a premium to the salesman, corresponding to 8% of the sales for standard sales volume, or 10% if the sales are greater than 1.000.000 euros. The macro is applied to the "premium" budget code.
IF Condition | SALES>1000000 |
THEN | SALES*0.1 |
ELSE | SALES*0.08 |